/*
 * Copyright (c) 2017,重庆阿莫比科技有限公司,All Rights Reserved.
 */
package com.wowocai.btchina.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.wowocai.btchina.mapper.TorrentMapper;
import com.wowocai.btchina.service.SearchEngineCacheService;

/**
 * <br/>
 * Date: 2017年4月1日 下午4:00:48 <br/>
 * 
 * @Author 刘建成
 * @Version
 */
@Service
@CacheConfig(cacheNames = "cache1h")
public class SearchEngineCacheServiceImpl implements SearchEngineCacheService {

    @Autowired
    private TorrentMapper torrentMapper = null;

    /**
     * TODO The function of this method is described here - Optional.
     * 
     * @see com.wowocai.btchina.service.SearchEngineCacheService#findTotalCount()
     */
    @Override
    @Cacheable
    public long findTotalCount() {

        long total = torrentMapper.countAllTorrent();
        total = 29000000 + total;
        return total;
    }

}
